<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>layout 后台大布局 - Layui</title>
    <link rel="stylesheet" href="__ADMIN__/layui/css/layui.css">
    <style>
        .layui-colla-title{
            position: relative;
            margin-left: 15px;
            height: 42px;
            line-height: 42px;
            padding: 0 15px 0 35px;
            color: #ffffff;
            background-color: rgba(105,105,105,0.01);
            cursor: pointer;
            font-size: 14px;
            overflow: hidden;
        }
        dl dd{
            margin-left: 15px;
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">layui 后台布局</div>
        <!-- 头部区域（可配合layui已有的水平导航） -->
        <ul class="layui-nav layui-layout-left">
            <li class="layui-nav-item"><a href="">控制台</a></li>
            <li class="layui-nav-item"><a href="">商品管理</a></li>
            <li class="layui-nav-item"><a href="">用户</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">其它系统</a>
                <dl class="layui-nav-child">
                    <dd><a href="">邮件管理</a></dd>
                    <dd><a href="">消息管理</a></dd>
                    <dd><a href="">授权管理</a></dd>
                </dl>
            </li>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    贤心
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black" style="width: 23%">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test" style="width: 100%">
                <li class="layui-nav-item">
                    <a href="javascript:;">分类管理</a>
                    <dl class="layui-nav-child">
                        <!--<dd><a href="javascript:;">列表一</a></dd>-->
                        <!--<dd><a href="javascript:;">列表二</a></dd>-->
                        <!--<dd><a href="">超链接</a></dd>-->
                        {php}$developer = config('developer');{/php}
                        {if $developer}
                <dd><a data-href="{:url('model/show_list')}" data-title="模型管理" href="javascript:;">模型管理</a></dd>
                {/if}
                <dd><a data-href="{:url('document/show_list')}" data-title="文档管理" href="javascript:void(0)">文档管理</a></dd>
                <dd><a data-href="{:url('cates/show_list')}?pid=h" data-title="栏目管理" href="javascript:void(0)">栏目管理</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">内容管理</a>
                    <dl class="layui-nav-child">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <h2 class="layui-colla-title"><a href="javascript:void(0)" class="dianji" data-href="http://www.baidu.com" data-title="杜甫">杜甫</a></h2>
                                <div class="layui-colla-content">
                                    <div class="layui-colla-item">
                                        <h2 class="layui-colla-title"><a href="javascript:void(0)" class="dianji" data-href="http://www.baidu.coms" data-title="李清照">李清照</a></h2>
                                        <div class="layui-colla-content">
                                            <div class="layui-colla-item">
                                                <a style="margin-left: 20px" href="javascript:void(0)" class="dianji" data-href="http://www.baidu.coms1" data-title="李清照1">李清照1</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-colla-item">
                                <h2 class="layui-colla-title">李清照</h2>
                                <div class="layui-colla-content">内容区域</div>
                            </div>
                            <div class="layui-colla-item">
                                <h2 class="layui-colla-title">鲁迅</h2>
                                <div class="layui-colla-content">内容区域</div>
                            </div>
                        </div>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">权限管理</a>
                    <dl class="layui-nav-child">
                <dd><a data-href="{:url('rote/show_list')}" data-title="角色管理" href="javascript:void(0)">角色管理</a></dd>
                <dd><a data-href="{:url('privilege/show_list')}" data-title="权限管理" href="javascript:void(0)">权限管理</a></dd>
                <dd><a data-href="{:url('adminuser/show_list')}" data-title="管理员列表" href="javascript:void(0)">管理员列表</a></dd>
                    </dl>
                </li>
                {if config('user')}
                <li class="layui-nav-item">
                    <a href="javascript:;">用户管理</a>
                    <dl class="layui-nav-child">
                        <dd><a data-href="{:url('user/occupation_list')}" data-title="用户职业设置" href="javascript:void(0)">用户职业设置</a></dd>
                        <dd><a data-href="{:url('user/vip_power_list')}" data-title="用户Vip权限设置" href="javascript:void(0)">用户Vip权限设置</a></dd>
                        <dd><a data-href="{:url('user/member')}" data-title="用户Vip设置" href="javascript:void(0)">用户Vip设置</a></dd>
                        <dd><a data-href="{:url('user/user_list')}" data-title="用户组权限设置" href="javascript:void(0)">用户列表</a></dd>
                    </dl>
                </li>
                {/if}
                <li class="layui-nav-item">
                    <a href="javascript:;">其他管理</a>
                    <dl class="layui-nav-child">
                        {if $danbiao}
                        {foreach $danbiao as $value}
                            <dd><a data-href="{:url('danbiao/show_list')}?modelid={$value['id']}" data-title="{$value['model_name']}" href="javascript:void(0)">{$value['model_name']}</a></dd>
                        {/foreach}
                        {/if}
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">数据库管理</a>
                    <dl class="layui-nav-child">
                <dd><a data-href="{:url('database/showdata')}" data-title="数据库备份" href="javascript:void(0)">数据库备份</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">常规管理</a>
                    <dl class="layui-nav-child">
                <dd><a data-href="{:url('conf/conf')}" data-title="系统配置" href="javascript:void(0)">系统配置</a></dd>
                <dd><a data-href="{:url('conf/lst')}" data-title="配置列表" href="javascript:void(0)">配置列表</a></dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <div class="layui-tab" lay-allowClose="true" lay-filter="test1">
                <ul class="layui-tab-title">
                    <li class="layui-this" lay-id="网站设置">网站设置</li>
                    <li lay-id="用户管理">用户管理</li>
                    <li lay-id="权限分配">权限分配</li>
                    <li lay-id="商品管理">商品管理</li>
                    <li lay-id="订单管理">订单管理</li>
                </ul>
                <div class="layui-tab-content" style="height: 100px;">
                    <div class="layui-tab-item layui-show">1</div>
                    <div class="layui-tab-item">2</div>
                    <div class="layui-tab-item">3</div>
                    <div class="layui-tab-item">4</div>
                    <div class="layui-tab-item">5</div>
                    <div class="layui-tab-item">6</div>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © layui.com - 底部固定区域
    </div>
</div>
<script src="__ADMIN__/layui/layui.all.js"></script>
<script src="__ADMIN__/js/jquery.3.3.1.min.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
        $(".layui-this i").attr('style','display:none');
        var layid = location.hash.replace(/^#test1=/, '');
        element.on('tab(test1)', function(){
            var $title = this.getAttribute('lay-id');
            console.log($title);
        });
    });
    $(".dianji").click(function () {
       var $href = $(this).attr('data-href');
       var $title = $(this).attr('data-title');
       console.log($href);
       console.log($title);
    });
</script>
</body>
</html>